<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Tasker\Configurator;

/**
 * Description of Configurator
 *
 * @author Jan Voracek
 */
class Configurator extends \Nette\Configurator
{

	public function __construct($containerClass = 'Nette\DI\Container')
	{
		parent::__construct($containerClass);

		$baseUrl = rtrim($this->container->httpRequest->getUrl()->getBaseUrl(), '/');
		$this->container->params['baseUrl'] = $baseUrl;
		$this->container->params['basePath'] = preg_replace('#https?://[^/]+#A', '', $baseUrl);
	}

}

?>
